<!DOCTYPE html>
<script>
if (window.testRunner)
  testRunner.setPrintingForFrame("frame");
</script>
<div style="height: 2000px"></div>
<iframe name="frame" srcdoc="
  <!DOCTYPE html>
  <div style='position: fixed'>Fixed</div>
  <div style='height: 2000px'>
    Contents
  </div>"
</iframe>
